package org.example.sudoku;

import org.example.sudoku.R.string;

import android.R.bool;
import android.content.Context;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;

public class Prefs extends PreferenceActivity {

	private static final String OPT_MUSIC="music";
	private static final Boolean OPT_MUSIC_DEF=true;
	
	private static final String OPT_HINTS="hints";
	private static final Boolean OPT_HINTS_DEF=true;
	@SuppressWarnings("deprecation")
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
	
		addPreferencesFromResource(R.xml.setttings);
	}
	
	public static Boolean getMusic(Context context) {
		return PreferenceManager.
				getDefaultSharedPreferences(context).
				getBoolean(OPT_MUSIC, OPT_MUSIC_DEF);
		
	}
	public static Boolean getHint(Context context) {
		return PreferenceManager.
				getDefaultSharedPreferences(context).
				getBoolean(OPT_HINTS, OPT_HINTS_DEF);
		
	}
}
